package com.sy.controller;

import com.sy.pojo.MailProperties;
import com.sy.util.POP3MailUtil;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/getMail")
@Configuration
public class POP3MailController {

    @Autowired
    private MailProperties mailProperties;

    @Value("${server.port}")
    private String port;

    @GetMapping()
    public String getHost(){
      return  mailProperties.getHost();
    }
    @Test
    public void abc () {
        System.err.println(mailProperties.getHost());
    }
}
